$(document).ready(function() {
	$(".bnt_frm").click(function() {
		var invoice_id = $("#invoice_id").val();
     if (invoice_id =="") {
     	jAlert("请填写订单号","撤销失败","");
     	return false;
     }
		$.ajax({
           url: "index.php?go=softpos.api.ajaxCancel",
           type: 'post',
           dataType: 'json',
           data:$("#frm").serialize(),
           success: function(response) {
               if (response.success == "success") {
                   jAlert("撤销成功","撤销成功",function(r) {
                       if (r==true) {
                          location.reload();
                       }
                   });
               } else {
                   jAlert(response.data,"撤销失败","");
               }
           }
       });
	});
});